<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>遍历器</title>
</head>
<body>
    <script>
        let a=[2,32,465,87,879,1];
        let b=[];
        console.log(...b);
        var z=a[Symbol.iterator]()
        for(let x of a.entries()){
            b.push(x);
            console.log(z.next())
        };
        console.log(b);
        var x=b[Symbol.iterator]();
        x.next();
        console.log(x.next());
        x.next();
        console.log(x.next());
        x.next();
        console.log(x.next());
        x.next();
        console.log(x.next());
        x.next();
        console.log(x.next());
        x.next();
        console.log(x.next());
        x.next();
        console.log(x.next());
        x.next();
        console.log(x.next());
        x.next();
        console.log(x.next());
    var y= new Map([['age','18']]);
       y.set('sex','male');
       for(var t of y){

           console.log(y)
       }
    </script>
</body>
</html>